<?php

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Crypt;
class UserTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $faker = Faker\Factory::create('zh_CN');
        for($i=0;$i<10;$i++){
            DB::table('user')->insert([
                'username' => $faker->name,
                'email' => $faker->email,
                'password' =>Crypt::encrypt('123456'),
                'phoneNumber'=>$faker->phoneNumber,
                'pic'=>$faker->imageUrl(300, 200),
                'updated_at'=>$faker->date('Y-m-d H:i:s'),
    		    'created_at'=>$faker->date('Y-m-d H:i:s'),
            ]);
        }

    }
}
